<form class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST">

    <!-- 商品名称 -->
    <div class="form-group">
        <label for="name" class="control-label col-xs-12 col-sm-2">{:__('ProductName')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="name" data-rule="required" class="form-control" name="row[name]" placeholder="{:__('ProductName')}" type="text" value="">
        </div>
    </div>

    <!-- 商品描述 -->
    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea class="form-control editor" id="content" name="row[content]"></textarea>
        </div>
    </div>

    <!-- 商品标签 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="flag" data-rule="required" class="form-control selectpicker" name="row[flag]">
                {foreach name="$FlagList" item="vo"}
                <option value="{$key}" {in name="key" value="" }selected{/in}>{$vo} </option> 
                {/foreach}
            </select>
        </div>
    </div>

    <!-- 商品状态 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="status" data-rule="required" class="form-control selectpicker" name="row[status]">
                {foreach name="$StatusList" item="vo"}
                <option value="{$key}" {in name="key" value="" }selected{/in}>{$vo} </option> 
                {/foreach}
            </select>
        </div>
    </div>

    <!-- 商品库存 -->
    <div class="form-group">
        <label for="stock" class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="stock" data-rule="required" class="form-control" name="row[stock]" placeholder="{:__('Stock')}" type="text" value="">
        </div>
    </div>

    <!-- 商品分类 -->
    <div class="form-group">
        <label for="typeid" class="control-label col-xs-12 col-sm-2">{:__('TypeName')}:</label>
        <div class="col-xs-12 col-sm-8">
            {$typelist}
        </div>
    </div>

    <!-- 商品单位 -->
    <div class="form-group">
        <label for="unitid" class="control-label col-xs-12 col-sm-2">{:__('UnitName')}:</label>
        <div class="col-xs-12 col-sm-8">
            {$unitlist}
        </div>
    </div>

    <!-- 商品价格 -->
    <div class="form-group">
        <label for="price" class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="price" data-rule="required" class="form-control" name="row[price]" placeholder="{:__('Price')}" type="text" value="">
        </div>
    </div>
    <!-- 商品图片 -->
    <div class="form-group">
        <label for="thumbs" classs="control-label col-xs-12 col-sm-2">{:__('Thumbs')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <!-- 上传路径 -->
                <input id="thumbs" class="form-control" size="50" name="row[thumbs]" type="text" readonly />

                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-thumbs" class="btn btn-danger faupload" data-input-id="thumbs" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-thumbs"><i class="fa fa-upload"></i> 上传</button></span>
                    <span><button type="button" id="fachoose-thumbs" class="btn btn-primary fachoose" data-input-id="thumbs" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
                </div>
                <span class="msg-box n-right" for="thumbs"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-thumbs"></ul>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
